package com.tigercel.xiangchengyun.ui.activities

import android.content.Intent
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.view.View
import com.tigercel.xiangchengyun.R
import kotlinx.android.synthetic.main.activity_modify_area.*
import kotlinx.android.synthetic.main.include_titlebar.*

class ModifyAreaActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_modify_area)
        titlebar_tv.text = "修改地址"
        titlebar_iv_left.setImageResource(R.drawable.btn_nav_back)
        titlebar_iv_left.visibility = View.VISIBLE
        titlebar_tv_right.text = "完成"
        titlebar_tv_right.visibility = View.VISIBLE
        titlebar_iv_left.setOnClickListener {
            this.finish()
        }
        titlebar_tv_right.setOnClickListener {
            val data = Intent()
            data.putExtra("data", et_area.text.toString())
            setResult(3, data)
            this.finish()
        }
    }
}
